class Solution {
public:
    double largestTriangleArea(vector<vector<int>>& points) {
        
        double dRet=0;
        for(int i=0;i<points.size();++i){
            for(int j=0;j<points.size();++j){
                if(j==i){
                    continue;
                }
                for(int z=0;z<points.size();++z){
                    if(z==j || z==i){
                        continue;
                    }
                    /*
                        x1 y1
                        x2 y2
                        x3 y3
                        x1 y1
                        x1*y2+x2*y3+x3*y1-y1*x2-y2*x3-y3*x1
                    */
                    dRet=max(dRet,0.5*abs(points[i][0]*points[j][1]+points[j][0]*points[z][1]+points[z][0]*points[i][1]-
                            points[i][1]*points[j][0]-points[j][1]*points[z][0]-points[z][1]*points[i][0]));
                }
            }
        }

        return dRet;
    }
};
